package com.gameShare.controller.base

import com.gameShare.entity.vo.ResponseVo
import com.gameShare.enums.misc.ResponseCodeEnum

open class BaseController {

    /**
     * 请求成功函数
     * 返回一个请求成功对象, data为需要返回前端的数据
     * @param T
     * @param data
     * @return
     */
    fun <T> getSuccessResponseVO(data : T) : ResponseVo<T>{
        return ResponseVo(ResponseCodeEnum.SUCCESSFUL.code, ResponseCodeEnum.SUCCESSFUL.msg , data)
    }
}